System and method for control and optimization of PCP pumped well

ABSTRACT

A method of controlling the production efficiency of a well includes determining one or more parameters of a pump model for a pump of the well, determining an inflow rate of liquid into the well, and adjusting a pumping speed of the pump based on the one or more parameters of the pump model to maintain a outflow rate of liquid from the well at a desired fraction of the inflow rate.

BACKGROUND

1. Field of Invention

Aspects and embodiments of the present disclosure are directed tosystems and methods for monitoring and optimizing operating parametersof oil and water well pumps, with specific reference to progressivecavity pumps.

2. Discussion of Related Art

Progressive cavity pumps (PCP) are artificial lift systems utilized invarious instances requiring the pumping of a fluid, for example, in theoil production industry for pumping oil from an oil well. A PCP oftenincludes a metallic helictical rotor that spins within a rubber(elastomeric) stator. The stator flexes to conform to portions of therotor and produce a seal between the rotor and different lobes of thestator. Cavities are formed between the rotor and stator that progressthrough the extension of the pump as the rotor spins, thus creating thepumping effect.

A PCP is used to produce liquids from wells by installing it down holeand linking the rotor to a rod string shaft and a drive head that willproduce the rotational movement. A PCP can also be linked to a down holemotor, hydraulic drive, or any other type of prime mover.

SUMMARY

In accordance with an aspect of the present disclosure, there isprovided a method for controlling the production efficiency of a well.The method comprises determining one or more parameters of a pump modelfor a pump of the well, determining a well inflow rate of liquid intothe well, and adjusting a pumping speed of the pump based on the one ormore parameters of the pump model to maintain a well outflow rate ofliquid from the well at a predetermined fraction of the well inflowrate. The predetermined fraction may be substantially equal to the wellinflow rate.

In some embodiments, the one or more parameters of the pump modelinclude one of slippage and cavity fillage.

In some embodiments, the cavity fillage is determined by a methodincluding measuring a first well outflow rate while running the pump ata first speed, measuring a second well outflow rate while running thepump at a second speed, and calculating the cavity fillage from acomparison between the first well outflow rate and the second welloutflow rate, a comparison between the first speed and the second speed,and a displacement of the pump.

In some embodiments, the method further comprises calculating theslippage from the first well outflow rate, the first speed, the cavityfillage, and the displacement of the pump.

In some embodiments, the well inflow rate is re-evaluated on a periodicbasis, the well inflow rate determined using a method including pumpinga level of liquid in the well down to an intake level of the pump,measuring a well outflow rate of the liquid from the well whileoperating the pump with the level of liquid in the well at the intakelevel of the pump, and setting the re-evaluated well inflow rate at themeasured well outflow rate.

In some embodiments, the method further comprises increasing theefficiency of the well by adjusting the pumping speed of the pump basedon the re-evaluated well inflow rate, the slippage, and the displacementof the pump.

In some embodiments, the method further comprises continuouslymonitoring the pumping speed of the pump and the well outflow rate and,responsive to the well outflow rate being more than a predeterminedamount more than an expected well outflow rate, performing are-calculation of slippage of the pump.

In some embodiments, the method further comprises adjusting the pumpspeed based on the re-calculation of the slippage of the pump responsiveto the well outflow rate being more than the predetermined amount morethan the expected well outflow rate.

In some embodiments, the method further comprises continuouslymonitoring the pumping speed of the pump and the well outflow rate and,responsive to the well outflow rate being less than a predeterminedamount less than an expected well outflow rate, adjusting the pumpingspeed.

In accordance with another aspect, there is provided a system forpumping liquid from a well. The system comprises a liquid pump disposedin a bore of the well, a flow meter configured to measure a well outflowrate of liquid from the well, and a controller in communication with theliquid pump and the flow meter. The controller is configured todetermine one or more parameters of a pump model for the liquid pump,determine an well inflow rate of liquid into a bore of the well, andadjust a pumping speed of the liquid pump based on the one or moreparameters of the pump model to maintain the well outflow rate at apredetermined fraction of the well inflow rate. The predeterminedfraction may be substantially equal to the well inflow rate.

In some embodiments, the one or more parameters of the pump modelinclude one of slippage and cavity fillage.

In some embodiments, the controller is configured to determine cavityfillage by a method including receiving an indication of a first welloutflow from the flow meter while running the liquid pump at a firstspeed, receiving an indication of a second well outflow rate from theflow meter while running the liquid pump at a second speed, andcalculating the cavity fillage from a comparison between the first welloutflow rate and the second well outflow rate, a comparison between thefirst speed and the second speed, and a displacement of the fluid pump.

In some embodiments, the controller is further configured to calculatethe slippage from the first well outflow rate, the first speed, thecavity fillage, and the displacement of the pump.

In some embodiments, the controller is further configured re-evaluatethe well inflow rate on a periodic basis, the well inflow ratedetermined by the controller using a method including pumping a level offluid in the well down to an intake level of the liquid pump, receivingan indication of a well outflow rate of the fluid from the well from theflow meter while operating the liquid pump with the level of fluid inthe well at the intake level of the liquid pump, and setting there-evaluated well inflow rate at the well outflow rate.

In some embodiments, the controller is further configured tocontinuously monitor the pumping speed of the pump and the well outflowrate and, responsive to the well outflow rate being more than apredetermined amount more than an expected well outflow rate, to performa re-calculation of slippage of the liquid pump.

In some embodiments, the controller is further configured to adjust thepumping speed based on the re-calculation of the slippage of the liquidpump responsive to the well outflow rate being more than thepredetermined amount more than the expected well outflow rate.

In some embodiments, the controller is further configured tocontinuously monitor the pumping speed of the liquid pump and the welloutflow rate and, responsive to the well outflow rate being less than apredetermined amount less than an expected well outflow rate, adjust thepumping speed.

In some embodiments, the controller is further configured to storeinformation pertaining to the well inflow rate, slippage, cavityfillage, well outflow rate, and other values of parameters associatedwith the well system.

In some embodiments, the controller is further configured to represent agraphical representation of the information in a human-machineinterface.

In some embodiments, the controller is further configured to track pumpslippage and cause an alarm if high pump slippage is detected.

In accordance with another aspect, there is provided a non-volatilecomputer readable medium having computer executable instructions encodedthereon which, when executed on a controller of a system for pumpingliquid from a well cause the controller to perform a method includingdetermining one or more parameters of a pump model for a pump of thewell, determining a well inflow rate of liquid into the well, andadjusting a pumping speed of the pump based on the one or moreparameters of the pump model to maintain a well outflow rate of liquidfrom the well at a predetermined fraction of the well inflow rate.

In some embodiments, the instructions further cause the controller todetermine a cavity fillage of the pump by a method including measuring afirst well inflow rate while running the pump at a first speed,measuring a second well inflow rate while running the pump at a secondspeed, and calculating the cavity fillage from a comparison between thefirst well inflow rate and the second well inflow rate, a comparisonbetween the first speed and the second speed, and a displacement of thepump.

In some embodiments, the instructions further cause the controller toperiodically re-evaluate the well inflow rate using a method includingpumping a level of fluid in the well down to an intake level of thepump, measuring a well outflow rate of the fluid from the well whileoperating the pump with the level of fluid in the well at the intakelevel of the pump, and setting the re-evaluated well inflow rate at themeasured well outflow rate.

In accordance with another aspect, there is provided a method fordetermining a well inflow of liquid into a well bore of a well. Themethod comprises pumping a level of liquid in the well down to an intakelevel of a pump in the well bore, measuring a well outflow of the fluidfrom the well while operating the pump with the level of liquid in thewell at the intake level of the pump, and setting the well inflow at themeasured well outflow.

In some embodiments, the method further comprises determining a maximumwell inflow by re-measuring the well outflow of the fluid from the wella plurality of times while operating the pump with the level of liquidin the well at the intake level of the pump until a final measured welloutflow differs from a previously measured well outflow by less than apredetermined amount, and setting the maximum well inflow at the finalmeasured well outflow.

In some embodiments, the method is performed on a substantiallyregularly timed basis.

In some embodiments, the method is performed responsive to a drop in ameasured outflow of the well.

In some embodiments, the method further comprises determining a wellinflow performance relationship from measurements of the well outflowand level of liquid in the well at multiple different values of welloutflow.

In some embodiments, the method further comprises determining a staticreservoir pressure of a reservoir associated with the well from themeasurements the well inflow and level of liquid in the well at multipledifferent values of well outflow.

In some embodiments, the method further comprises estimating a dynamicliquid level of the well from measurements of the well inflow, welloutflow, and inflow performance relationship at a plurality of differenttimes.

In accordance with another aspect, there is provided a system forpumping liquid from a well. The system comprises a liquid pump disposedin a bore of the well, a flow meter configured to measure a well outflowof liquid from the well, and a controller in communication with theliquid pump and the flow meter and configured to determine a well inflowof liquid into a well bore of the well by pumping a level of liquid inthe well down to an intake level of the liquid pump, measuring a welloutflow of the fluid from the well while operating the pump with thelevel of liquid in the well at the intake level of the pump, and settingthe well inflow at the measured well outflow.

In some embodiments, the controller is further configured to determine amaximum well inflow by re-measuring the well outflow of the fluid fromthe well a plurality of times while operating the pump with the level ofliquid in the well at the intake level of the pump until a finalmeasured well outflow differs from a previously measured well outflow byless than a predetermined amount, and setting the maximum well inflow atthe final measured well outflow.

In some embodiments, the controller is further configured to adjust aspeed of the liquid pump responsive to the measured well outflow.

In some embodiments, the controller is further configured to determine awell inflow performance relationship from measurements of the welloutflow and level of liquid in the well at multiple different values ofwell outflow.

In some embodiments, the controller is further configured to determine astatic reservoir pressure of a reservoir associated with the well fromthe measurements of the well inflow and level of liquid in the well atmultiple different values of well outflow.

In some embodiments, the controller is further configured to estimate adynamic liquid level of the well from measurements of the well inflow,well outflow, and inflow performance relationship at a plurality ofdifferent times.

In accordance with another aspect, there is provided a non-volatilecomputer readable medium having computer executable instructions encodedthereon which, when executed on a controller of a system for pumpingliquid from a well cause the controller to perform a method includingdetermining a well inflow of liquid into a well bore of the well bypumping a level of liquid in the well down to an intake level of theliquid pump, measuring a well outflow of the fluid from the well whileoperating the pump with the level of liquid in the well at the intakelevel of the pump, and setting the well inflow at the measured welloutflow.

In accordance with another aspect, there is provided a method ofcontrolling the production efficiency of a well. The method comprisesdetermining one or more parameters of a pump model for a liquid pump ofthe well by measuring well outflow of liquid from the well at aplurality of different pumping speeds of the liquid pump, and adjustinga nominal operating pumping speed of the pump based on the one or moreparameters of the pump model to maintain a well outflow rate of liquidfrom the well at a desired level.

In some embodiments, the desired level is a predetermined fraction of aninflow rate of fluid into a well bore of the well. In some embodiments,the predetermined fraction is substantially the same as the inflow rate.

In some embodiments, the one or more parameters of the pump modelinclude one of slippage and cavity fillage.

In some embodiments, the slippage is determined by a method includingmeasuring a first well outflow rate while running the liquid pump at afirst speed, and calculating the slippage by a comparison of atheoretical pump outflow at the first speed provided by a manufacturerof the liquid pump and the first well outflow rate.

In some embodiments, the method further comprises increasing theefficiency of the well by adjusting the pumping speed of the liquid pumpbased on the slippage and a displacement of the pump.

In some embodiments, the cavity fillage is determined by a methodincluding measuring a first well outflow rate while running the liquidpump at a first speed, measuring a second well outflow rate whilerunning the liquid pump at a second speed, and calculating the cavityfillage from a comparison between the first well outflow rate and thesecond well outflow rate, a comparison between the first speed and thesecond speed, and a displacement of the liquid pump.

In some embodiments, the method further comprises calculating theslippage from the first well outflow rate, the first speed, the cavityfillage, and the displacement of the liquid pump.

In some embodiments, the method further comprises increasing theefficiency of the well by adjusting the pumping speed of the liquid pumpbased on the slippage, the cavity fillage, and the displacement of thepump.

In some embodiments, the method further comprises calculating the cavityfillage from a measured well outflow rate at a set pumping speed, theslippage, and the displacement of the pump.

In some embodiments, the method further comprises continuouslymonitoring the pumping speed of the pump and the well outflow rate and,responsive to the well outflow rate being more than a predeterminedamount more than an expected well outflow rate, performing are-calculation of slippage of the pump.

In some embodiments, the method further comprises adjusting the pumpspeed based on the re-calculation of the slippage of the pump responsiveto the well outflow rate being more than the predetermined amount morethan the expected well outflow rate.

In some embodiments, the method further comprises continuouslymonitoring the pumping speed of the pump and the well outflow rate and,responsive to the well outflow rate being less than a predeterminedamount less than an expected well outflow rate, adjusting the pumpingspeed.

In accordance with another aspect, there is provided a system forpumping liquid from a well. The system comprises a liquid pump disposedin a bore of the well, a flow meter configured to measure a well outflowrate of liquid from the well, and a controller in communication with theliquid pump and the flow meter and configured to determine one or moreparameters of a pump model for the liquid pump by measuring well outflowof liquid from the well at a plurality of different pumping speeds ofthe liquid pump, and adjust a pumping speed of the liquid pump based onthe one or more parameters of the pump model to maintain the welloutflow rate substantially equal to a desired level.

In some embodiments, the one or more parameters of the pump modelinclude one of slippage and cavity fillage.

In some embodiments, the controller is configured to determine cavityfillage by a method including receiving an indication of a first welloutflow from the flow meter while running the liquid pump at a firstspeed, receiving an indication of a second well outflow rate from theflow meter while running the liquid pump at a second speed, andcalculating the cavity fillage from a comparison between the first welloutflow rate and the second well outflow rate, a comparison between thefirst speed and the second speed, and a displacement of the fluid pump.

In some embodiments, the controller is further configured to calculatethe slippage from the first well outflow rate, the first speed, thecavity fillage, and the displacement of the pump.

In some embodiments, the controller is further configured tocontinuously monitor the pumping speed of the pump and the well outflowrate and, responsive to the well outflow rate being more than apredetermined amount more than an expected well outflow rate, to performa re-calculation of slippage of the liquid pump.

In some embodiments, the controller is further configured to adjust thepumping speed based on the re-calculation of the slippage of the liquidpump responsive to the well outflow rate being more than thepredetermined amount more than the expected well outflow rate.

In some embodiments, the controller is further configured tocontinuously monitor the pumping speed of the liquid pump and the welloutflow rate and, responsive to the well outflow rate being less than apredetermined amount less than an expected well outflow rate, adjust thepumping speed.

In accordance with another aspect, there is provided a non-volatilecomputer readable medium having computer executable instructions encodedthereon which, when executed on a controller of a system for pumpingliquid from a well cause the controller to perform a method includingdetermining one or more parameters of a pump model for a liquid pump ofthe well by measuring well outflow of liquid from the well at aplurality of different pumping speeds of the liquid pump, and adjustinga pumping speed of the liquid pump based on the one or more parametersof the pump model to maintain a well outflow rate of liquid from thewell at a desired level.

In some embodiments, the instructions further cause the controller todetermine a cavity fillage of the pump by a method including measuring afirst well inflow rate while running the liquid pump at a first speed,measuring a second well inflow rate while running the liquid pump at asecond speed, and calculating the cavity fillage from a comparisonbetween the first well inflow rate and the second well inflow rate, acomparison between the first speed and the second speed, and adisplacement of the liquid pump.

In some embodiments, the instructions further cause the controller tocalculate the slippage from the first well outflow rate, the firstspeed, the cavity fillage, and the displacement of the pump, and adjustthe pumping speed based on calculation of the slippage of the liquidpump responsive to the well outflow rate being more than thepredetermined amount more than the expected well outflow rate.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings are not intended to be drawn to scale. In thedrawings, each identical or nearly identical component that isillustrated in various figures is represented by a like numeral. Forpurposes of clarity, not every component may be labeled in everydrawing. In the drawings:

FIG. 1 is a schematic diagram of a well and pump system;

FIG. 2 is a flow chart of a method of controlling a pump for a well;

FIG. 3 is a flow chart of a portion of the method of FIG. 2;

FIG. 4 is a flow chart of a portion of the method of FIG. 2;

FIG. 5 is a flow chart of a portion of the method of FIG. 2;

FIG. 6 is a block diagram of a computer system upon which embodiments ofa method for controlling a pump of a well may be performed; and

FIG. 7 is a block diagram of a memory system of the computer system ofFIG. 6.

DETAILED DESCRIPTION

This disclosure is not limited in its application to the details ofconstruction and the arrangement of components set forth in thefollowing description or illustrated in the drawings. The disclosedsystems and methods are capable of other embodiments and of beingpracticed or of being carried out in various ways. Also, the phraseologyand terminology used herein is for the purpose of description and shouldnot be regarded as limiting. The use of “including,” “comprising,”“having,” “containing,” “involving,” and variations thereof herein ismeant to encompass the items listed thereafter and equivalents thereofas well as additional items.

Various aspects and embodiments disclosed herein include systems andmethods for monitoring and controlling various operating parameters of afluid pump system, for example, an oil well pump system utilized to pumpoil from an oil reservoir. In some embodiments, by determining theparameters of a pump model and the oil production capability of an oilreservoir (the well inflow, or rate of flow of liquid into the well borefrom a reservoir), the system pumping speed may be controlled and may beautomatically adjusted to provide improved and/or optimal operatingconditions for a specific well. Embodiments of systems and methodsdisclosed herein protect the pumping system from unexpected situationssuch as a sudden reduction in well inflow, an obstruction in the pumpintake, accumulation of sand, instrumentation misinformation, excessivepump wear, or other operational disturbances, thus preventing damage tothe pump, rod string, and other components of the pumping system.

Various aspects and embodiments disclosed herein perform automatic andongoing testing to determine oil well pumping system operatingparameters including, for example, well inflow, pump slippage (an amountof fluid entering an inlet of a pump that is not expelled from theoutlet of the pump), and pump cavity fillage (a proportion of thecavities of a PCP that are filled with liquid, rather than gas, whilethe pump is pumping) under controlled conditions without the need tohalt production of the well. Information regarding these parameters isused to create an adjusted pump model based on slippage and cavityfillage. An improved and/or optimum pump operating speed is thendetermined and set for a predefined time period. Operating the pump atthe improved and/or optimum pump operating speed increases theefficiency of operation of the oil well.

Some methods used to determine the operational condition of an oil wellmay rely on static testing, which requires a halt in production, oftenof at least 24 hours, while the testing takes place. These methods candetermine static pressure, formation parameters, and potential liquidflow from the well by measuring the evolution of down hole pressureor/and annular liquid levels, but may be applied sporadically as theyrequire well intervention.

In some methods, pump operational parameters and performance may beidentified on test benches which baseline a pump on its parameters priorto the installation in the well. The operational parameters of a PCP,however, may change dramatically after installation due to swelling orwear of the elastomeric material of the stator, producing changes influid slippage through the pump and, therefore, changes in pumpefficiency. Operating a PCP based on parameters determined prior tobeginning operation of the pump in a well may result in operating thepump at conditions which are non-optimal or less efficient than may bedesired.

Some methods for automatic operation of oil pumps may rely oncontrollers that, by means of measurements of well outflow (the rate offluid exiting the well or liquid production of a well) and a variablespeed drive, run the pump at speed step increases that cause the well toreach a pump off state (a state in which the pump is running faster thannecessary to remove liquid inflowing into the well). During this processthe flow will increase proportionally to the speed increase until thepump off condition is reached, which is detected by a less thatproportional increase in flow per speed increase. The pump speed is thendecreased until a proportional decrease in the outflow is detected,identifying that the pump off condition has ceased. This process isrepeated on an ongoing basis producing a constant oscillation in pumpspeed and production. These methods may be sensitive to noise from theflow metering device that can lead to erratic behavior.

An alternative method is to accelerate a pump of a well to the maximumoperating speed of the pump while monitoring well outflow until the pumpoff condition is detected by a sudden drop in well outflow. The pumpspeed is then reduced by steps until a proportional reduction in welloutflow is detected at which point the operating speed of the pump isdefined. This method leads to a high risk for the pump as operating athigh speeds in a pump off condition can lead to permanent damage to thepump.

Various aspects and embodiments disclosed herein overcome variousdisadvantages of these methods for oil well pump control. Aspects andembodiments disclosed herein include systems and methods for controllingthe speed of a PCP to increase well outflow while avoiding operation ofthe well in a pumped-off state. In one embodiment, illustratedschematically in FIG. 1, a pumping system, generally indicated at 100,includes a controller 110 to control a variable speed drive 120 to drivea PCP 130 at a set pump speed while measuring well 140 and systemparameters indicative of pumping performance, well outflow, and wellinflow. The controller 110 may also, in some embodiments, gatherdifferent well head parameters including well head pressure, linepressure, line temperature, etc. from the well head that can be used forcontrol or protection of the pumping system 100.

In some embodiments, well outflow is measured using a flow sensor 150,which may be any flow sensor for measuring the flow of fluid that isknown in the art. The controller 110 determines a model of the pumpingsystem and the well inflow from the well and system parameters. Thecontroller 110, acting through the variable speed drive 120, in responseto the measured well and system parameters, then sets the speed of thepump 130 to match the well outflow with the well inflow, or with adesired fraction of the well inflow. Further, the controller 110,responsive to the measured well and system parameters, periodicallyre-evaluates the well inflow to determine a new pump speed matching thewell inflow or fraction thereof while avoiding pump and well operationin a pumped-off state.

In some embodiments, a control method performed by the controller 110may include starting the well pump 130 at a low, constant speed (a speedwhich does not lead to a pump off condition) and monitoring the welloutflow until stable operating conditions, for example, the productiontubing being full of liquid and a liquid level in the well bore beingstable, are observed. Stabilization of the operating conditions may, insome embodiments, take between about 15 minutes and about four hours.Once stable operating conditions are achieved, the controller 110 will,on a periodic basis, perform one or more operations including, forexample, performing a measurement of slippage of the pump 130, perform ameasurement of cavity fillage of the pump 130, adjust pump modelparameters based on one or both of the slippage and cavity fillagemeasurements, measure well inflow, and calculate pump speed required tomatch well outflow with a measured well inflow or fraction thereof.

In some embodiments, a plurality of measurements of well inflow may betaken at different times. The plurality of measurements of well inflowmay be used to calculate various parameters of the well, for example, amaximum well inflow value, an inflow performance relationship (IPR, arelationship between well inflow and bottomhole flowing pressure orreservoir pressure), dynamic liquid level of the well, static reservoirpressure of a reservoir associated with the well, and a remainingcapacity of the reservoir associated with the well. For example, theinflow performance relationship can be determined by the maximum inflowand liquid level values at a different production rates, dynamic liquidlevel of the well may be determined by the IPR or from a staticcondition measured by measuring the time and well outflow required tobring fluid to the surface of the well, or, alternatively, to reach apump off condition at different times. The static reservoir pressure maybe determined from the inflow performance relationship. The remainingcapacity of the reservoir may be determined from a change in the staticreservoir pressure over time.

In some embodiments, the controller 110 will, on a continuous basis,perform one or more operations including, for example, monitoring thewell outflow to verify that the well outflow remains within a defineddead band from a calculated flow value obtained from the adjusted modeland for a constant speed of the pump, re-measuring slippage andadjusting the pump model and the speed of the pump 130 if the welloutflow rises above an upper limit of the dead band (which may occur dueto swelling of the pump stator), and adjusting the speed of the pump 130to match a new flow value if the well outflow drops below a lower limitof the dead band (which may occur if inflow was reduced or some kind ofobstruction occurred to the well or pump).

In some embodiments, the controller 110 will determine slippage byobtaining a well outflow and pump speed measurement and comparing thesevalues with the expected well outflow at zero head for that pump (acondition in which the slippage is zero). In some embodiments, slippage(Sl) is determined using the following equation:Sl=Qm−Dp*Vm

Where Qm is measured well outflow, Vm is measured pump speed, and Dp ispump displacement or pump capacity. Dp is a constant for a particularpump.

Further, the controller 110 may determine slippage and cavity fillage(Cf) by obtaining well outflow and pump speed measurements at twodifferent pump speeds (Q1 and V1, and Q2 and V2, respectively) andcalculating cavity fillage and slippage as follows:

$C_{f} = \frac{\left( {Q_{2} - Q_{1}} \right)}{D_{p} \cdot \left( {V_{2} - V_{1}} \right)}$Sl = −Q₂ + D_(p)C_(f)V₂ = −Q₁ + D_(p)C_(f)V₁

Further, assuming no change in the pump slippage in a time interval, thecavity fillage can be calculated as a function of pump speed (V) asfollows:

$C_{f} = \frac{\left( {Q_{m} + {Sl}} \right)}{D_{p}V}$

The adjusted pump model is now calculated as:Qc=Dp*Cf*V−Sl

Where Qc is the new calculated outflow rate.

In some embodiments, to determine well inflow, the controller 110 willincrease the pump speed with a constant slow acceleration. The speed ofthe pump should be increased at a rate which is slow enough to let thewell and the reservoir react to the change in pump speed and exhibitcharacteristics, for example, liquid level and/or well inflow (orvariations thereof) that are similar to what would be observed whenoperating at a constant pump speed. The speed ramp can achieve speedvalues as high as the maximum operating speed of the pump and may beperformed over a time period of from about 30 minutes to about 12 hours.An increase in well outflow is expected as a result of increasing thespeed of the pump. The pump speed may be increased to a speed sufficientto achieve an over pumped condition wherein the liquid in the well ispumped down to the pump intake level, a condition known as pump off.Providing that the speed of the pump is increased slowly enough duringthe speed ramp, the pump cavity fillage may remain high enough to avoidany kind of pump damage.

While the pump speed ramp evolves, the over pumping condition occurs. Asthe slope of the ramp evolves, the well liquid level approximates thepump off level. The pump off level can be identified by comparing themodeled well outflow with the measured well outflow. A mismatch betweenthe modeled well outflow and the measured well outflow provides anidentification of the pump off condition being reached. Also, thecondition can be detected by calculating the cavity fillage. A drop incavity fillage value provides an identification of the pump offcondition. At pump off, the well outflow that can be obtained from thewell will match the well inflow.

The well inflow will increase in a short span of time with a decrease indown hole pressure with a logarithmic behavior for a specific well borepressure, making the well inflow asymptotically approach the maximumwell inflow for that pressure condition over time. For this reason, itmay be desirable to repeat the well inflow measurement several times toaccurately determine the maximum well inflow value for a well.

Knowing the well inflow (Qi) and the pump model, a new operating speed Vfor the pump 130 can be calculated as:V=(Qi+Sl)/DpOrV=(Qi+Sl)/(Dp*Cf)

Cf is normally about one, but this may vary on wells with high amountsof associated gas and/or low values of down hole pressure.

On a continuous basis, the controller will monitor pump speed and welloutflow. The controller will maintain the well outflow within a defineddead band from the calculated well outflow expected based on the speedof the pump. If the well outflow is above this dead band then slippagewill be recalculated and the pump speed adjusted accordingly. If thewell outflow is below the dead band the pump speed will be adjusted tomatch the current well outflow.

In case of noise in the flow signal that can be produced by gasseparation at the flow meter, back pressure valves, solids, vibrationsat the flow meter, pump slip stick, etc., a low pass filter may beapplied to the flow signal and the filtered flow signal may be used forcontrol proposes.

A generalized method for performing well production optimization isshown in the flowchart of FIG. 2. The method, generally indicated at200, beings with act 205 where the well controller 110 is set to“production optimization” mode. In act 210, initial conditions, forexample, an initial pump speed (a speed which does not lead to a pumpoff condition) are set. The pump speed is changed to the initial pumpspeed if the pump is not already operating at the initial pump speed andthe well is run for a period of time, controlled by a well stabilizationtimer (act 215) to allow well parameters, for example, the well outflowand/or a fluid level in the well bore to stabilize. The wellstabilization timer is in some embodiments included in the controller110. Additionally or alternatively, the well outflow may be monitoredand the stabilization period terminated when a change in well outflowover time drops below a predetermined level. In other embodiments, thestabilization period may be terminated when the liquid level in the boreof the well achieves a constant level. In some embodiments,stabilization may take between about 15 minutes and about four hours.

After stabilization, an inflow test scheduler is initialized (act 220).The inflow test scheduler may be set to trigger an inflow test on aperiodic basis, for example about once every four hours to seven days.In some embodiments, the scheduler additionally or alternativelydetermines when pump parameters, for example, slippage and/or cavityfillage are re-calculated. The pump speed is checked and the averagewell outflow at the initial pump speed (Qi) is measured and recorded(act 225), for example, in a memory of the controller 110. Due to noisethat may be present in a signal of well outflow, a signal from a welloutflow meter may be processed through a low pass filter, oralternatively, a moving average of the outflow signal or other method ofsignal smoothing may be utilized when measuring the well outflow.

In act 230, an inflow test is performed. An embodiment of a method ofperforming an inflow test is illustrated in FIG. 3, indicated generallyat 300. Referring to FIG. 3, in one embodiment, in act 305, the inflowtest begins. In act 310, the average well outflow (Qi) measured in act225 of the method 200 and the initial pump speed (pump RPM or Vinitial)set in act 210 are obtained, for example, from a memory of thecontroller 110. A first measurement of slippage of the PCP (Sl1) iscalculated in act 310 according to the equations:Qzerohead=Dp*VinitialSl1=Qzerohead−Qi

Where Qzerohead is the expected well outflow under conditions of nofluid head above the PCP.

In act 315, the speed of the pump is set to a first reduced speed (Vr₁)for the inflow test. Vr₁ may be achieved by reducing the pump speedVinitial by a predetermined amount that will make the calculated flow Qcmatch the lower deadband (DB) of the outflow. The well is run for aperiod of time (act 320) to allow well parameters, for example, theoutflow from the well to stabilize. The period of time for which thewell runs to allow for stabilization to occur may be controlled by thewell outflow stabilization timer. Additionally or alternatively, theoutflow from the well may be monitored and the stabilization periodterminated when a change in outflow over time drops below apredetermined level. Stabilization may, in some embodiments, takebetween about 30 seconds and about 10 minutes. After stabilization, afirst well outflow (Qc₁) at the first reduced pump speed for the inflowtest is measured or calculated and Qc₁ and Vr₁ are stored, for example,in a memory of the controller 110. Qc₁ may be calculated from theequation:Qc ₁ =Dp*Vr ₁ −Sl1

In act 330, the pump speed is again reduced by a predetermined amount,which may be the same or different as the predetermined amount DB bywhich the pump speed is reduced in act 315, to achieve a second reducedpump speed Vr₂. The well is run for a period of time (act 335) to allowwell parameters, for example, the outflow from the well to stabilize.The period of time for which the well runs to allow for stabilization tooccur may be controlled by the well outflow stabilization timer.Additionally or alternatively, the outflow from the well may bemonitored and the stabilization period terminated when a change inoutflow over time drops below a predetermined level. In otherembodiments, the stabilization period may be terminated when the liquidlevel in the bore of the well achieves a constant level. Stabilizationmay, in some embodiments, take between about 30 seconds and about 10minutes. After stabilization, the well outflow Qc₂ at the second reducedpump speed is measured or calculated and Qc₂ and Vr₂ are stored, forexample, in a memory of the controller 110.

In act 345, calculations are performed to determine Cf and a secondslippage (Sl2) from Vr₁, Vr₂, Qc₁, and Qc₂ in accordance with thefollowing equations:Cf=(Qc ₁ −Qc ₂)/(Dp*(Vr ₁ −Vr ₂))Sl2=−Qc ₁ +Dp*Cf*Vr ₁ =−Qc ₂ +Dp*Cf*Vr ₂In act 350, Sl1 is compared to Sl2. If the calculated values of Sl1 andSl2 are about equal, for example, within about 5% of each other, theslippage of the pump Sl is set at the value of Sl1 (or Sl2) and Cf ofthe pump is set at 1 in act 360. If the calculated values of Sl1 and Sl2are not equal, in act 355 the slippage of the pump Sl is set at thevalue of Sl2 and Cf of the pump is set at the value calculated in act345. The set values of Sl and Cf for the pump may be stored, forexample, in a memory of the controller 110.

In act 365 the speed of the pump is increased to perform a speed ramp.In some embodiments, the speed ramp is performed by continuouslyincreasing the speed of the pump, and in other embodiments, the speed ofthe pump is increased in steps. The speed of the pump may be increasedat a rate which is slow enough to let the well and the reservoir reactto the change in pump speed and exhibit characteristics, for example,liquid level and/or well inflow (or variations thereof) that are similarto what would be observed when operating at a constant pump speed. Thespeed ramp can achieve speed values as high as the maximum operatingspeed of the pump and may be performed over a time period of from about30 minutes to about 12 hours. The speed ramp may result in the pumpramping up to a speed as high as about two times its nominal operatingspeed. As the pump speed is increased the pump speed (V(t)) and welloutflow Qm are measured at intervals of time (act 370) corresponding toa 5% change in speed of the pump or less. Modeled well outflow (Qc(t))at the corresponding intervals of time is calculated (act 375) accordingto the equation:Qc(t)=Dp*V(t)−Sl

The pump speed ramp continues until the measured well outflow Qm(t) issmaller than (Qc−BD) (decision act 380), where BD is a predeterminedamount of flow below the calculated flow. When it is determined thatQm(t) is smaller than (Qc−BD) the new well inflow (Qf) is measured andthe new target pump speed (Vnew) is calculated (acts 385, 390) bysolving the following equation:Vnew=(Qf*SM+Sl)/Dp

Where SM is a user defined margin, which is in some embodiments betweenabout 0.8 and about 1, although in other embodiments may be betweenabout 0.01 and about 1.

Once the new target pump speed is calculated, the new target pump speedis set (act 395), the inflow test method 300 is completed, and thecontroller 110 returns (act 397) to performing the method 200 at act250.

Referring back to FIG. 2, after the inflow test is performed, the welloutflow and pump speed are re-measured (act 235) and recorded, forexample, in a memory of the controller 110. The inflow test scheduler isupdated in act 240 to decrement the remaining time before a next inflowtest is performed.

In act 245, it is determined whether the scheduler has triggered aninflow test (IT). If no inflow test has been triggered, the methodcontinues to act 255. If an inflow test has been triggered, the methodproceeds to act 250 in which an inflow test is performed.

In act 255, the well outflow is measured and compared to the lower limitof the dead band for the pump speed (DB). In some embodiments, the welloutflow may have decreased due to, for example, a decrease in wellinflow and/or wear of the pump and/or an increase in gas levels in thewell causing a greater amount of pump slippage and/or a lower cavityfillage. If the well outflow is determined to be above DB, the method200 proceeds to act 265. If the well outflow is determined to be belowDB, the method 200 proceeds to act 260, where a low inflow handlingmethod is performed. An embodiment of a low inflow handling method 400is shown in the flowchart of FIG. 4.

Referring to FIG. 4, in one embodiment, the low inflow handling methodgenerally indicated at 400 is initiated at act 405. In act 410, theinflow test scheduler is disabled so that an inflow test is nottriggered until the low inflow handling method comes to completion. Inact 415 a new pump speed Vn is calculated from the well outflow (Q) andthe slippage of the pump (Sl) according to the formula:Vn=(Q−Sl)/Dp

In act 420, the new pump speed Vn is modified by applying the userdefined margin SM to the pump speed to obtain a new pump speed set point(Vsp) according to the formula:Vsp=Vn*SM

The pump speed is set at the new pump speed set point Vsp and in act 425the well stabilization timer is triggered. The well stabilization timeris, in some embodiments, set at between about 30 seconds and about tenminutes. In acts 430 and 435 if the well outflow remains above DB andthe timer continues to run, the method waits for the timer to completeand then proceeds to trigger an inflow test and reset the scheduler (act440) and to then return (act 445) to act 265 of the method 200. If,however, the well outflow falls below DB while the timer continues torun, the method 400 returns to act 415 to calculate a new pump speed andapply the margin to the new pump speed. In some embodiments, instead of,or in addition to using a stabilization timer in acts 430 and 435, welloutflow may be monitored, and stabilization may be considered to becompleted when the change in the well outflow over time falls below apredefined limit.

Returning to method 200 shown in FIG. 2, in act 265 the well outflow ismeasured and it is determined if the well outflow is above an upperlimit of the well outflow dead band (BD). The well outflow may, in someembodiments, have increased if the stator of the pump swelled, thusreducing an amount of slippage of the pump or if the well inflowincreased. If the well outflow is below BD, the method returns to act235 and continues to perform inflow tests on a periodic basis and tomonitor and adjust the pump speed and/or well outflow as needed. If thewell outflow is above BD, the method 200 proceeds to act 270, where ahigh outflow handling method is performed. An embodiment of a highoutflow handling method 500 is shown in the flowchart of FIG. 5.

Referring to FIG. 5, in one embodiment of the high outflow handlingmethod, generally indicated at 500, the method is initiated at act 505.In act 510, the inflow test scheduler is disabled so that an inflow testis not triggered until the high outflow handling method 500 comes tocompletion. In act 515 a first well outflow (Qi) and a first speed ofthe pump (V₁) are measured and stored, for example, in a memory of thecontroller 110. In act 520, a first slippage Sl1 of the pump iscalculated in accordance with the formulas:Qzerohead=Dp*v ₁Sl1=Qzerohead−Q ₁

In acts 525-570, the Cf and slippage of the pump are calculated in amanner similar to that described above with regard to acts 315-360 ofthe inflow test method 300. After the Cf and slippage of the pump areset, in act 575, a new speed of the pump Vc may be calculated inaccordance with the formula:Vc=(Q−Sl)/(Dp*Cf)

The inflow test scheduler is re-enabled in act 580 and the method endsand returns to act 240 of method 200 in act 585.

In some embodiments, the controller 110 will store the well inflow,slippage, cavity fillage, well outflow, and any other values ofparameters associated with the well system. In some embodiments, thecontroller will represent a graphical representation of one or more ofthe well inflow, slippage, and cavity fillage in an human-machineinterface (HMI) as well as any other variables that are stored. Thecontroller will track pump slippage and will cause an alarm if high pumpslippage is detected to identify a potential condition of excessive pumpwear.

The controller 110 used for monitoring and controlling operation of thepump 130 may include a computerized control system. Various aspects maybe implemented as specialized software executing in a general-purposecomputer system 600 such as that shown in FIG. 6. The computer system600 may include a processor 602 connected to one or more memory devices604, such as a disk drive, solid state memory, or other device forstoring data. Memory 604 is typically used for storing programs and dataduring operation of the computer system 600. Components of computersystem 600 may be coupled by an interconnection mechanism 606, which mayinclude one or more busses (e.g., between components that are integratedwithin a same machine) and/or a network (e.g., between components thatreside on separate discrete machines). The interconnection mechanism 606enables communications (e.g., data, instructions) to be exchangedbetween system components of system 600. Computer system 600 alsoincludes one or more input devices 608, for example, a keyboard, mouse,trackball, microphone, touch screen, and one or more output devices 610,for example, a printing device, display screen, and/or speaker. Theoutput devices 610 may also comprise valves, pumps, or switches whichmay be utilized to control the pump 130 and/or variable speed drive 120.One or more sensors 614 may also provide input to the computer system200. These sensors may include, for example, a pump speed sensor, flowsensor 150, well head pressure sensors, line pressure sensors, and/orline temperature sensors. In addition, computer system 600 may containone or more interfaces (not shown) that connect computer system 600 to acommunication network in addition or as an alternative to theinterconnection mechanism 606.

The storage system 612, shown in greater detail in FIG. 7, typicallyincludes a computer readable and writeable nonvolatile recording medium702 in which signals are stored that define a program to be executed bythe processor or information to be processed by the program. The mediummay include, for example, a disk or flash memory. Typically, inoperation, the processor causes data to be read from the nonvolatilerecording medium 702 into another memory 704 that allows for fasteraccess to the information by the processor than does the medium 702.This memory 704 is typically a volatile, random access memory such as adynamic random access memory (DRAM) or static memory (SRAM). It may belocated in storage system 612, as shown, or in memory system 604. Theprocessor 602 generally manipulates the data within the integratedcircuit memory 604, 704 and then copies the data to the medium 702 afterprocessing is completed. A variety of mechanisms are known for managingdata movement between the medium 702 and the integrated circuit memoryelement 604, 704, and embodiments disclosed herein are not limited toany particular data movement mechanism. Embodiments disclosed herein arenot limited to a particular memory system 604 or storage system 612.

The computer system may include specially-programmed, special-purposehardware, for example, an application-specific integrated circuit(ASIC). Embodiments disclosed herein may be implemented in software,hardware or firmware, or any combination thereof. Further, such methods,acts, systems, system elements and components thereof may be implementedas part of the computer system described above or as an independentcomponent.

Although computer system 600 is shown by way of example as one type ofcomputer system upon which various embodiments disclosed herein may bepracticed, it should be appreciated that the embodiments disclosedherein are not limited to being implemented on the computer system asshown in FIG. 6. Various embodiments disclosed herein may be practicedon one or more computers having a different architecture or componentsthat that shown in FIG. 6.

Computer system 600 may be a general-purpose computer system that isprogrammable using a high-level computer programming language. Computersystem 600 may be also implemented using specially programmed, specialpurpose hardware. In computer system 600, processor 602 is typically acommercially available processor such as the well-known Pentium™ orCore™ class processors available from the Intel Corporation. Many otherprocessors are available. Such a processor usually executes an operatingsystem which may be, for example, the Windows 7 or Windows 8 operatingsystem available from the Microsoft Corporation, the MAC OS System Xavailable from Apple Computer, the Solaris Operating System availablefrom Sun Microsystems, or UNIX available from various sources. Manyother operating systems may be used.

The processor and operating system together define a computer platformfor which application programs in high-level programming languages arewritten. It should be understood that embodiments disclosed herein arenot limited to a particular computer system platform, processor,operating system, or network. Also, it should be apparent to thoseskilled in the art that the embodiments disclosed herein are not limitedto a specific programming language or computer system. Further, itshould be appreciated that other appropriate programming languages andother appropriate computer systems could also be used.

One or more portions of the computer system may be distributed acrossone or more computer systems (not shown) coupled to a communicationsnetwork. These computer systems also may be general-purpose computersystems. For example, various embodiments disclosed herein may bedistributed among one or more computer systems configured to provide aservice (e.g., servers) to one or more client computers, or to performan overall task as part of a distributed system. For example, variousembodiments disclosed herein may be performed on a client-server systemthat includes components distributed among one or more server systemsthat perform various functions according to various embodiments. Thesecomponents may be executable, intermediate (e.g., IL) or interpreted(e.g., Java) code which communicate over a communication network (e.g.,the Internet) using a communication protocol (e.g., TCP/IP). In someembodiments one or more components of the computer system 600 maycommunicate with one or more other components over a wireless network,including, for example, a cellular telephone network.

It should be appreciated that embodiments disclosed herein are notlimited to executing on any particular system or group of systems. Also,it should be appreciated that embodiments disclosed herein are notlimited to any particular distributed architecture, network, orcommunication protocol. Various embodiments may be programmed using anobject-oriented programming language, such as SmallTalk, Java, C++, Ada,or C# (C-Sharp). Other object-oriented programming languages may also beused. Alternatively, functional, scripting, and/or logical programminglanguages may be used. Various embodiments disclosed herein may beimplemented in a non-programmed environment (e.g., documents created inHTML, XML or other format that, when viewed in a window of a browserprogram, render aspects of a graphical-user interface (GUI) or performother functions). Various embodiments disclosed herein may beimplemented as programmed or non-programmed elements, or any combinationthereof.

In some embodiments, the controller 110 may be implemented as aprogrammable logic controller (PLC) and include capabilities for datasharing with a supervisory system, for example, a SCADA (supervisorycontrol and data acquisition) system. A HMI may be the primary interfacewith the controller 110.

Having thus described several aspects of at least one embodiment of thisinvention, it is to be appreciated various alterations, modifications,and improvements will readily occur to those skilled in the art. Anyfeature described in any embodiment may be included in or substitutedfor any feature of any other embodiment. Such alterations,modifications, and improvements are intended to be part of thisdisclosure, and are intended to be within the scope of the invention.Accordingly, the foregoing description and drawings are by way ofexample only.

What is claimed is:
 1. A method for controlling the productionefficiency of a well, the method comprising: determining one or moreparameters of a pump model for a pump of the well, the one or moreparameters of the pump model including cavity fillage, the cavityfillage being determined by a method including: measuring a first welloutflow rate while running the pump at a first speed; measuring a secondwell outflow rate while running the pump at a second speed; andcalculating the cavity fillage from a comparison between the first welloutflow rate and the second well outflow rate, a comparison between thefirst speed and the second speed, and a displacement of the pump;determining a well inflow rate of liquid into the well; and adjusting apumping speed of the pump based on the one or more parameters of thepump model to maintain a well outflow rate of liquid from the well at apredetermined fraction of the well inflow rate.
 2. The method of claim1, further comprising calculating the slippage from the first welloutflow rate, the first speed, the cavity fillage, and the displacementof the pump.
 3. The method of claim 2, wherein the well inflow rate isre-evaluated on a periodic basis, the well inflow rate determined usinga method including: pumping a level of liquid in the well down to anintake level of the pump; measuring a well outflow rate of the liquidfrom the well while operating the pump with the level of liquid in thewell at the intake level of the pump; and setting the re-evaluated wellinflow rate at the measured well outflow rate.
 4. The method of claim 3,further comprising increasing the efficiency of the well by adjustingthe pumping speed of the pump based on the re-evaluated well inflowrate, the slippage, and the displacement of the pump.
 5. The method ofclaim 1, further comprising continuously monitoring the pumping speed ofthe pump and the well outflow rate and, responsive to the well outflowrate being less than a predetermined amount less than an expected welloutflow rate, adjusting the pumping speed.
 6. A method for controllingthe production efficiency of a well, the method comprising: determiningone or more parameters of a pump model for a pump of the well, the oneor more parameters of the pump model including one of slippage andcavity fillage; determining a well inflow rate of liquid into the well;adjusting a pumping speed of the pump based on the one or moreparameters of the pump model to maintain a well outflow rate of liquidfrom the well at a predetermined fraction of the well inflow rate; andcontinuously monitoring the pumping speed of the pump and the welloutflow rate and, responsive to the well outflow rate being more than apredetermined amount more than an expected well outflow rate, performinga re-calculation of slippage of the pump.
 7. The method of claim 6,further comprising adjusting the pump speed based on the re-calculationof the slippage of the pump responsive to the well outflow rate beingmore than the predetermined amount more than the expected well outflowrate.
 8. A system for pumping liquid from a well, the system comprising:a liquid pump disposed in a bore of the well; a flow meter configured tomeasure a well outflow rate of liquid from the well; and a controller incommunication with the liquid pump and the flow meter and configured to:determine one or more parameters of a pump model for the liquid pump,the one or more parameters of the pump model including cavity fillage,the controller configured to determine the cavity fillage by a methodincluding: receiving an indication of a first well outflow from the flowmeter while running the liquid pump at a first speed; receiving anindication of a second well outflow rate from the flow meter whilerunning the liquid pump at a second speed; and calculating the cavityfillage from a comparison between the first well outflow rate and thesecond well outflow rate, a comparison between the first speed and thesecond speed, and a displacement of the fluid pump; determine a wellinflow rate of liquid into the bore of the well; and adjust a pumpingspeed of the liquid pump based on the one or more parameters of the pumpmodel to maintain the well outflow rate at a predetermined fraction ofthe well inflow rate.
 9. The system of claim 8, wherein the controlleris further configured to calculate the slippage from the first welloutflow rate, the first speed, the cavity fillage, and the displacementof the pump.
 10. The system of claim 9, wherein the controller isfurther configured re-evaluate the well inflow rate on a periodic basis,the well inflow rate determined by the controller using a methodincluding: pumping a level of fluid in the well down to an intake levelof the liquid pump; receiving an indication of a well outflow rate ofthe fluid from the well from the flow meter while operating the liquidpump with the level of fluid in the well at the intake level of theliquid pump; and setting the re-evaluated well inflow rate at the welloutflow rate.
 11. The system of claim 8, wherein the controller isfurther configured to continuously monitor the pumping speed of theliquid pump and the well outflow rate and, responsive to the welloutflow rate being less than a predetermined amount less than anexpected well outflow rate, adjust the pumping speed.
 12. The system ofclaim 8, wherein the controller is further configured to storeinformation pertaining to the well inflow rate, slippage, cavityfillage, well outflow rate, and other values of parameters associatedwith the well system.
 13. The system of claim 12, wherein the controlleris further configured to represent a graphical representation of theinformation in a human-machine interface.
 14. The system of claim 8,wherein the controller is further configured to track pump slippage andcause an alarm if high pump slippage is detected.
 15. A system forpumping liquid from a well, the system comprising: a liquid pumpdisposed in a bore of the well; a flow meter configured to measure awell outflow rate of liquid from the well; and a controller incommunication with the liquid pump and the flow meter and configured to:determine one or more parameters of a pump model for the liquid pump,the one or more parameters of the pump model including one of slippageand cavity fillage; determine a well inflow rate of liquid into the boreof the well; adjust a pumping speed of the liquid pump based on the oneor more parameters of the pump model to maintain the well outflow rateat a predetermined fraction of the well inflow rate; and continuouslymonitor the pumping speed of the pump and the well outflow rate and,responsive to the well outflow rate being more than a predeterminedamount more than an expected well outflow rate, perform a re-calculationof slippage of the liquid pump.
 16. The system of claim 15, wherein thecontroller is further configured to adjust the pumping speed based onthe re-calculation of the slippage of the liquid pump responsive to thewell outflow rate being more than the predetermined amount more than theexpected well outflow rate.
 17. A non-transitory computer readablemedium having computer executable instructions encoded thereon which,when executed on a controller of a system for pumping liquid from a wellcause the controller to perform a method including: determining one ormore parameters of a pump model for a pump of the well, the one or moreparameters including a cavity fillage of the pump, the cavity fillage ofthe pump determined by a method including: measuring a first well inflowrate while running the pump at a first speed; measuring a second wellinflow rate while running the pump at a second speed; and calculatingthe cavity fillage from a comparison between the first well inflow rateand the second well inflow rate, a comparison between the first speedand the second speed, and a displacement of the pump; determining a wellinflow rate of liquid into the well; and adjusting a pumping speed ofthe pump based on the one or more parameters of the pump model tomaintain a well outflow rate of liquid from the well at a predeterminedfraction of the well inflow rate.
 18. The computer readable medium ofclaim 17, wherein the instructions further cause the controller toperiodically re-evaluate the well inflow rate using a method including:pumping a level of fluid in the well down to an intake level of thepump; measuring a well outflow rate of the fluid from the well whileoperating the pump with the level of fluid in the well at the intakelevel of the pump; and setting the re-evaluated well inflow rate at themeasured well outflow rate.